package com.abou.mvc.controller.customer.product.detail;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.abou.constant.product.ECategory;
import com.abou.constant.product.EProductType;
import com.abou.mvc.controller.ControllerUtils;
import com.abou.mvc.controller.customer.product.search.CustomerClothesBoySearchController;

/**
 * @author kaka
 */
@Controller
@RequestMapping("/customer/products/boy/clothing-boy-detail.do")
public class ProductBoyDetailController extends AProductDetailController {
  
  /**
   * The request mapping for search boy clothing products view
   */
  public static final String VIEW_REQUEST_MAPPING =
      "/customer/products/boy/clothing-boy-detail.do";
  
  /**
   * The search boy clothing products view
   */
  public static final String VIEW_NAME =
      "customer/products/boy/clothing-boy-detail";
  
  /**
   * @param viewName
   * @param exPrevViewName
   */
  public ProductBoyDetailController() {

    super(VIEW_NAME, CustomerClothesBoySearchController.VIEW_NAME);
    
    productType = EProductType.CLOTHING_BOY;
    category = ECategory.BOY;
  }
  
  /**
   * @param productId
   */
  @RequestMapping(method = RequestMethod.GET)
  public String showPage(Integer productId, ModelMap model) {

    model.put(ControllerUtils.SEARCH_REQUEST_ATT, createProductsRequest());
    
    return super.showPage(productId, model);
  }
}
